package com.kaishengit.pojo;

import java.util.List;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;


@Entity
@Table(name="t_user")
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class User {
	private int id;
	private String username;
	private String password;
	private String nickname;
	private String img;
	private List<Userproject> userproject;
	private List<Goal> goallist;
	private List<Task> tasklist;
	private List<Document> documentList;
	private List<Filetype> filetypelist;
	private List<Files> filelist;
	private List<Record> recordList;
	private List<Idea> ideaList;
	private List<Ideacomment> ideacommentList;
	private List<Message> messageList;
	private List<Atmessage> atmessageList;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getNickname() {
		return nickname;
	}
	public void setNickname(String nickname) {
		this.nickname = nickname;
	}
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	@OneToMany(mappedBy="user")
	public List<Userproject> getUserproject() {
		return userproject;
	}
	public void setUserproject(List<Userproject> userproject) {
		this.userproject = userproject;
	}
	@OneToMany(mappedBy="user")
	public List<Goal> getGoallist() {
		return goallist;
	}
	public void setGoallist(List<Goal> goallist) {
		this.goallist = goallist;
	}
	@OneToMany(mappedBy="user")
	public List<Task> getTasklist() {
		return tasklist;
	}
	public void setTasklist(List<Task> tasklist) {
		this.tasklist = tasklist;
	}
	@OneToMany(mappedBy="user")
	public List<Document> getDocumentList() {
		return documentList;
	}
	public void setDocumentList(List<Document> documentList) {
		this.documentList = documentList;
	}
	@OneToMany(mappedBy="user")
	public List<Filetype> getFiletypelist() {
		return filetypelist;
	}
	public void setFiletypelist(List<Filetype> filetypelist) {
		this.filetypelist = filetypelist;
	}
	@OneToMany(mappedBy="user")
	public List<Files> getFilelist() {
		return filelist;
	}
	public void setFilelist(List<Files> filelist) {
		this.filelist = filelist;
	}
	@OneToMany(mappedBy="user")
	public List<Record> getRecordList() {
		return recordList;
	}
	public void setRecordList(List<Record> recordList) {
		this.recordList = recordList;
	}
	@OneToMany(mappedBy="user")
	public List<Idea> getIdeaList() {
		return ideaList;
	}
	public void setIdeaList(List<Idea> ideaList) {
		this.ideaList = ideaList;
	}
	@OneToMany(mappedBy="user")
	public List<Ideacomment> getIdeacommentList() {
		return ideacommentList;
	}
	public void setIdeacommentList(List<Ideacomment> ideacommentList) {
		this.ideacommentList = ideacommentList;
	}
	@OneToMany(mappedBy="user")
	public List<Message> getMessageList() {
		return messageList;
	}
	public void setMessageList(List<Message> messageList) {
		this.messageList = messageList;
	}
	@OneToMany(mappedBy="user")
	public List<Atmessage> getAtmessageList() {
		return atmessageList;
	}
	public void setAtmessageList(List<Atmessage> atmessageList) {
		this.atmessageList = atmessageList;
	}
}
